package com.samecity.mvp.view.activity.loginActivity;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.samecity.R;
import com.samecity.mvp.base.BaseActivity;
import com.samecity.mvp.model.loginModel.LoginModel;
import com.samecity.mvp.presenter.LoginPresenter.LoginPresenter;


public class LoginActivity extends BaseActivity<LoginPresenter> implements LoginView, View.OnClickListener {
    @NonNull
    @Override
    protected View initView(@NonNull LayoutInflater inflater, Bundle savedInstanceState) {

        return inflater.inflate(R.layout.activity_login, null);
    }

    @Override
    protected LoginPresenter initPresenter() {
        return new LoginPresenter(new LoginModel());
    }


    @Override
    public void initViewData() {
        TextView xlLogin = (TextView) findViewById(R.id.id_login_commit);
        xlLogin.setOnClickListener(this);
        ImageView QQLogin = (ImageView) findViewById(R.id.id_qq_login);
        QQLogin.setOnClickListener(this);
        ImageView WXLogin = (ImageView) findViewById(R.id.id_wx_login);
        WXLogin.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.id_login_commit:
                mPresenter.Login(this);
                break;
            case R.id.id_qq_login:

                break;
            case R.id.id_wx_login:

                break;
        }
    }
}
